package com.palmwindActivity.widget;

import com.palmwindActivity.app.IUIShell;
import com.palmwindActivity.app.IUiEventListener;

import android.content.Context;
import android.view.KeyEvent;
import android.widget.Gallery;

public class ShellGallery extends Gallery implements IUIShell{

    protected IUiEventListener uiEventListener;

    public ShellGallery(Context context)
    {
        super(context);
    }

	public boolean onKeyUp (int keyCode, KeyEvent event)
	{
		boolean isHandle = false;
		if(uiEventListener != null)
		{
			isHandle = uiEventListener.onKeyUp(keyCode, event);
		}
		return isHandle? true: super.onKeyUp(keyCode, event);
	}

	public void setUiEventListener(IUiEventListener listener) {
		this.uiEventListener = listener;
	}

	public IUiEventListener getUiEventListener() {
		return uiEventListener;
	}
}
